const fs = require('fs');
const path = require('path');
try{
 let res = fs.statSync(path.resolve(__dirname, './test.txt'));
 console.log('isFile', res.isFile());
 console.log('isDirectory', res.isDirectory());
 if(res.isFile()){
  console.log('size', res.size);
  console.log('create time', res.birthtime);
  console.log('mtime', res.mtime);
 }
}catch(err){
  console.log(err, 'statSync error')
}
